"Sslprotocol= "TLS" sslenabledprotocols= "tlsv1,tlsv1.1,tlsv1.2"Keystorefile= "/home/test/tomcat/apache-tomcat-7.0.68/example.com.jks"keypass= "Changeit" keystorepass= "Npzd9zgk"/>
Protocol: Set up a protocol for handling traffic, using bio. See the "Tomcat Profile Resolution" subsection for a detailed explanation. As an optimization, you might consider using NiO or NIO2 (if supported) instead, and the other HTTPS settings are the same. B
-storepass Changeit keytool-import-trustcacerts-alias tomcat-file server.cer-keystore%JAVA_HOME%/JR E/lib/security/cacerts-storepass Changeit If you have a hint, enter Y. Other useful Keytool commands (lists all existing certificates in the Trust certificate library, removing a certificate from the Library): Keytool-list-v-keystore d:/sdks/jdk1.5.0_11/jre/lib/security/cacerts Keytool-delete-trustcacerts-alias Tomcat-keystore D:/sdks/jdk1.5.0_11/jre/lib/security/cacerts-storepass Changeit3. Confi
add the following code:
maxThreads="150"scheme="https"secure="true"
clientAuth="false"sslProtocol="TLS"
keystoreFile="d:/mykeystore"
keystorePass="changeit"/>
The keystoreFile in the code can be written as an absolute path. Note that the protocol in the Code has different tomcat configurations in different versions. For details, refer:
Tomcat 4.1.34 Configuration
port="8443"enableLookups="true"scheme="https"secure="true"
ac
server. cer-keystore server. keystore-storepass changeitkeytool-import-trustcacerts-alias tomcat-file server. cer-keystore % java_home %/JRE/lib/security/cacerts-storepass changeit if prompted, enter y. Other useful keytool commands (list all existing certificates in the trust certificate library, delete a certificate in the library): keytool-list-v-keystore D: /sdks/jdk1.5.0 _ 11/JRE/lib/security/cacertskeytool-delete-trustcacerts-alias tomcat-keystore D: /sdks/jdk1.5.0 _ 11/JRE/lib/security/c
-trustcacerts-alias tomcat-file server. cer-keystore % java_home %/JRE/lib/security/cacerts-storepass changeit if prompted, enter y. Other useful keytool commands (list all existing certificates in the trust certificate library, delete a certificate in the library): keytool-list-v-keystore D: /sdks/jdk1.5.0 _ 11/JRE/lib/security/cacertskeytool-delete-trustcacerts-alias tomcat-keystore D: /sdks/jdk1.5.0 _ 11/JRE/lib/security/cacerts-storepass changeit3. configure Tomcat: Modify % atat_home %/CONF
Server.keystore-validity 3600Keypass and Storepass two parameters followed by a password.Username input domain name, such as localhost (dev or test) or hostname.domainname (user owned domain name), all others are skipped with enter, last confirmed, this will be generated under%tomcat_home% Server.keystore File.Note: The parameter-validity refers to the certificate's validity period (days), the default validity period is very short, only 90 days.Configure TomcatTo modify the%tomcat_home%confserv
1. Generate a Certificate(1) Open Keytool.exe under the JDK's installation directory \bin\keytool.exe On the command line, enter the following command:Keytool-genkeypair-alias "Tomcat"-keyalg "RSA"-keystore "E:\tomcat.keystore"-validity 36500 The above command will produce a pair of asymmetric keys and self-signed certificates E:\tomcat.keystoreNote: "First and last name" should be the domain name, lost to the name, and the real run time domain name does not match, will be problematicHere
the signed digital certificate into the KeyStore)Keytool-import-v-alias custom-file custom.cer-keystore server.jks-storepass Password4, view the contents of the certificateKeytool-list-v-keystore server.jks-storepass Password5. Configure Tomcat Service.xml filesmaxthreads= "Scheme=" "https" secure= "true"Clientauth= "true" sslprotocol= "TLS"Keystorefile= "D:/server.jks" keystorepass= "password"Truststorefile= "D:/server.jks" truststorepass= "password
JBoss.
2. The. KeyStore (the default path under C:/Documents and settings/user name) is placed under Jbosshome/server/default/conf and renamed to Chap8.keystore.
3. Open Jbosshome/server/default/deploy/jbossweb-tomcat55.sar/server.xml, modify the following configuration:maxthreads= "strategy=" "MS" maxhttpheadersize= "8192"Emptysessionpath= "true"Scheme= "https" secure= "true" Clientauth= "false"Keystorefile= "${jboss.server.home.dir}/conf/chap8.keystore"keystorepass= "Rmi+ssl"
. /ca/ca-cert.pem-cakey. /ca/ca-key.pem-cacreateserial-days 36
OpenSSL x509-in Client-cert.pem-noout-text-modulus
4. Export the certificate to a browser-supported. P12 Format:
OpenSSL pkcs12-export-clcerts-in Client-cert.pem-inkey client-key.pem-out client.p12
Password: Changeit
To generate a JKs file from a CA certificate
Keytool-keystore truststore.jks-keypass 123456-storepass 123456-alias ca-import-trustcacerts-file ~/ca/ca-cert.pem
Import Certificate
Import Ca-cert.p12 as a trust
: Sha256withrsaVersion: 3Extended:#1: objectid:2.5.29.14 criticality=falseSubjectkeyidentifier [KeyIdentifier [0000:62 1F B0 5C 94, BF D3 C5, D3 D0 CB bb...\.w.4. B...0010:ce A1 94 D1 ....]]Do you trust this certificate? [No]: Y enter Y toThe certificate has been added to the KeyStoreFourth Step:Locate the Server.xml under the Conf file in the Tomcat directory;Found itconnectiontimeout= "20000"redirectport= "8443"/>Join in the backmaxthreads= "200"Sslenabled= "true"Scheme= "https"Secure= "true"C
, and the real run time domain name does not match, will be problematic--------------------------------------------------------------------------------------------------------------- ------------To configure Tomcat:Navigate to the Tomcat installation directory and locate the Server.xml file under ConfFind the following code that has been commented:XML code
Connector port="8443" protocol="http/1.1" sslenabled="true"
maxthreads= "Scheme=" " https" secure="true"
clientauth="false
commands, you can enter the following commandC:\users\test>move. KeyStore D:\apache-tomcat-7.0. - \conf moved. 1 files.5. View Conf\server.xmlFind an example of port= "8443" and copy the contents of the middle of the comment. The author found the content as follows -- >Copy the content between ConnectorPort= "8443"Protocol= "Org.apache.coyote.http11.Http11Protocol"MaxThreads= "Max"sslenabled= "true"Scheme= "https"Secure= "true"ClientAuth= "false"
authentication ConfigurationCopy the correctly imported keystore. jks file to the conf directory under the tomcat installation directory. Open the server. xml file in the conf directory, find and modify the following content:Maxthreads = "150" minsparethreads = "25" maxsparethreads = "75"Enablelookups = "false" disableuploadtimeout = "true"Acceptcount = "100" Scheme = "HTTPS" secure = "true"Clientauth = "false" sslprotocol = "TLS"/>SSL Access Port-->
Step 1: generate the. keystore File% Java_home % keytool-genkey-alias tomcat-keyalg RSA-keystore my. keystoreStep 2: Modify the Tomcat server. xml fileCopy the generated tomcat. keystore file to the conf folder of Tomcat, which is in the same path as the server. xml file,Port = "8443" maxthreads = "200"Scheme = "HTTPS" secure = "true" sslenabled = "true"Keystorefile = "./CONF/mytomcat. keystore" keystorepass = "123qew"Clientauth = "false" sslprotocol
. Install the server certificate1. One-way authentication ConfigurationCopy the correctly imported keystore. jks file to the conf directory under the Tomcat installation directory. Open the server. xml file in the conf directory, find and modify the following content:MaxThreads = "150" scheme = "https" secure = "true"ClientAuth = "false" sslProtocol = "TLS"/>SSL Access Port-->ChangeMaxThreads = "150" scheme = "https" secure = "true"KeystoreFile = "con
returnusing the List command to view the server's certificate library, we can see two inputs, one server certificate and one trusted client certificate:Fourth Step: Configure the Tomcat serverOpen the/conf/server.xml under the Tomcat root directory and locate the following configuration section, as follows:Open Commentsmaxthreads= "scheme=" "https" secure= "true"clientauth= "true" sslprotocol= "TLS "keystorefile= "D:/downloads/tomcat.keystore" keysto
generatedServer.keystorefile, set here.Server.keystorethe password isenvisi0n, this password will be used in the back.. keytool-genkey-alias tomcat-keyalg rsa-keypassenvisi0n-storepass envisi0n-keystore server.keystore-validity36002) according to KeyStore file to generate a certificate, the purpose of this command is to Tomcat The home directory is generated Server.cer certificate File . Keytool-export-trustcacerts-alias Tomcat-fileserver.cer-keystore Server.keystore-storepass Envisi0n3)%tomcat
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.